<template>
	<view style="padding: 20upx;">
		<view v-for="(item, index) in goodsList" :key="index" @click="goCeping(item.eval_ids)">
			<view class="listImage" style="display: flex;">
				<image :src="item.img" mode="aspectFill"></image>
				<view style="display: flex;flex-direction: column;">
					<text class="title clamp">{{item.title}}</text>
					<text style="margin-top: 20upx;color: red;text-decoration: line-through;">3024人评测过</text>
					<text style="margin-top: 20upx;font-size: 20upx;font-family: PingFang SC, PingFang SC-Medium;font-weight: 500;color: #0097ff;">限时免费</text>
				</view>
				<span v-if="item.tag" style="position: absolute; top:0;left: 0;paddinf:3px 6px;background: #ff4757;border: 5rpx;border-radius: 5rpx;color: #ffffff;font-size: 24rpx;padding: 2rpx;margin-right: 6rpx;">{{item.tag}}</span>
			</view>
			
		
		</view>
	</view>
</template>

<script>
	export default{
			data() {
				return {
					goodsList:[],
				};
			},
			onLoad(options){
				this.getTestList();
			},
			methods:{
				async getTestList() {
					var that = this;
					this.$zdapi.getTestList({
					}).then( res => {
						that.goodsList = res.data
					})
				},
				
				goCeping(id){
					uni.navigateTo({
						url: `/pages/ceping/cepingDetail?id=${id}`
					})
				}
			}
		}
	</script>

<style lang="scss">
	.listImage{
		image{
			width: 200upx;
			height: 200upx;
			border-radius: 5upx;
			margin-right: 10upx;
		}
	}
	.listImage:nth-of-type(n+1){
		margin-top: 25upx;
	}
</style>
